// $Id: logger.h 65 2004-10-27 21:44:50Z hansemil $
#ifndef LOGGER_H
#define LOGGER_H

#include <fstream>

/**
 * Logger is the virtual base class of all Loggers. A Logger  registers itself at the Loghandler and handles calls that it receives. It should be used to log useful information about the simulation. To create a new type of Logger override the Logger class and appropriate methods in it, then register those methods at the LogHandler (IMPORTANT!) in the constructor.
 * @todo Describe this in detail. What methods to call and so on.
 */
class Logger {
public:
	virtual ~Logger() {}
	static void setSimulationVars(const char *, unsigned int);

	// TODO: "virtual void ???() {};" For all methods in LogHandler
	virtual void eos_init_start(void *) {}
	virtual void eos_simulate_start(void *) {}
	virtual void eos_simulate_stop(void *) {}
	virtual void node_node(void *) {}
	virtual void node_requestFile(void *, void *, bool) {}
	virtual void node_routeFile(void *, void *, void *, unsigned char) {}
	virtual void node_transfer(void *, void *, unsigned char) {}
	virtual void clock_tick(unsigned int time) {}
	virtual void network_transfer(void *, void *, unsigned int) {}

protected:
	void openFile(std::fstream *, const char *);

private:
	static char m_prefix[128];

};

#endif
